Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

262
Vistas
"POST http://localhost:4000/api/upload_file net::ERR_BLOCKED_BY_CLIENT" when post formdata via fetch

I am trying to make file upload app with containerized React & Node.js. I got stuck with the error when I try to upload file. The developer console says like this on the VPS server.

 POST http://localhost:4000/api/upload_file net::ERR_BLOCKED_BY_CLIENT

I built Node.js docker container at http://localhost:4000 and accepts post request to the route /api/upload_file and React container at http://localhost:3000 which accepts get request to the frontend.

My frontend javascript file related to fetch is here.

const TARGET = process.env.TARGET || 'localhost:4000'

export default async function uploadFile(formData) {
  const fetchedData = await fetch(`http://${TARGET}/api/upload_file`, {
    method: 'POST',
    body: formData 
  })
  .then((response) => {
    if (response.ok) {
      return response.json()
    } else {
      throw new Error('Something went wrong')
    }
  })
  .then(res => {
    return { 
      filename: res?.filename
    }
  })
  .catch((error) => {
    console.log(error)
  })
  return fetchedData
} 

I searched for the solutions, but it seems browser's adblocker causes the error... I tried Chrome, Firefox and Brave, and had the same results.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda